#ifndef __TICTACTOE_H__
#define __TICTACTOE_H__
#include <QtGui>
#include <QVector>
#include <utility>
#include <QPushButton>

#include "case.h"

// First is x and second is y
typedef std::pair<int, int> coordonnees;

namespace TicTacToe {
  /** Classe principale du TicTacToe.
   */
  class TicTacToe : public QMainWindow {
    Q_OBJECT
    public:
      /** Permet de créer la fenêtre principale (et unique).
       */
      TicTacToe();

      void click();

      coordonnees index2coordonnees(const int index);

      int coord2index(const coordonnees c);

    protected:
      bool m_Playeur;
      QVector<QPushButton*> m_Vector;

    private:
      QToolBar* getToolBar() const;

    public slots:
      void caseClicked(Case *c);
  };
}

#endif // __TICTACTOE_H__
